import _http from '@/utils/http'

export default {

  //公用
  userList(params, loading, headers) {
    return _http('post', { url: '/api/users/list', apiName: '用户列表' }, params, loading, headers)
  },
  addUser(params, loading, headers) {
    return _http('post', { url: '/api/users/add', apiName: '新增用户' }, params, loading, headers)
  },
  userInfo(params, loading, headers) {
    return _http('post', { url: '/api/users/info', apiName: '用户详情' }, params, loading, headers)
  },
  editUser(params, loading, headers) {
    return _http('post', { url: '/api/users/update', apiName: '编辑用户' }, params, loading, headers)
  },
  delUser(params, loading, headers) {
    return _http('post', { url: '/api/users/del', apiName: '删除用户' }, params, loading, headers)
  },
  restoreUser(params, loading, headers) {
    return _http('post', { url: '/api/users/restoreUser', apiName: '恢复用户' }, params, loading, headers)
  },
  downloadTemplate(params, loading, headers) {
    return _http('post', { url: '/api/users/download/template', apiName: '下载模板' }, params, loading, headers)
  },
  downloadExcel(params, loading, headers) {
    return _http('post', { url: '/api/users/download/excel', apiName: '下载Excel' }, params, loading, headers)
  },
  uploadExcel(params, loading, headers) {
    return _http('post', { url: '/api/users/upload/excel', apiName: '上传Excel' }, params, loading, headers)
  },


}
